
// 获取随机图表数据
function getRandomChartData() {
	let arr = [];
	for(let i = 0; i < 10; i++) {
		arr.push(Math.floor(Math.random()*10));
	}
	return arr;
}


// 配置
const CONFIG = {
    /**
     * 销售趋势
     * name：名称
     * num：数量
     * vs：vs后的文本
     * result：变化率结果。大于0为绿色，小于0为红色
     * **/
    xsqs: [
        {
            name: '总销量',
            num: 52821,
            vs: '12-02 至 12-31',
            result: '1440.00'
        },
        {
            name: '商品曝光次数',
            num: 899757,
            vs: '12-02 至 12-31',
            result: '926.02'
        },
        {
            name: '商品点击次数',
            num: 39343,
            vs: '12-02 至 12-31',
            result: '735.31'
        },
        {
            name: '转化率',
            num: '2.97%',
            vs: '12-02 至 12-31',
            result: '0.44'
        }
    ],
    /**
     * 图表数据
     * green： 颜色为绿色的线的数据
     * yellow： 颜色为黄色的线的数据
     * **/
    chartData: [{"green":1545,"yellow":1001},{"green":1536,"yellow":1000},{"green":1551,"yellow":1023},{"green":1589,"yellow":1007},{"green":1574,"yellow":1029},{"green":1634,"yellow":1092},{"green":1724,"yellow":1078},{"green":1555,"yellow":1076},{"green":1551,"yellow":1064},{"green":1863,"yellow":1031},{"green":1668,"yellow":1090},{"green":1904,"yellow":1108},{"green":1570,"yellow":1166},{"green":1719,"yellow":1117},{"green":1798,"yellow":1233},{"green":1718,"yellow":1120},{"green":1597,"yellow":1230},{"green":1855,"yellow":1224},{"green":1779,"yellow":1320},{"green":2000,"yellow":1033},{"green":1530,"yellow":1037},{"green":1959,"yellow":1177},{"green":1628,"yellow":1306},{"green":1710,"yellow":1405},{"green":2292,"yellow":1050},{"green":2150,"yellow":1027},{"green":1897,"yellow":1220},{"green":1784,"yellow":1390},{"green":2290,"yellow":1072},{"green":1851,"yellow":1459}],
    // 值范围
    chatGreenRange: [1500, 2500],
    chatYellowRange: [1000, 1500],
      
    /**
     * 表格数据
     * 商品信息
     * xpxx.img：图片地址。‘./static/image/goods/’是存产品图的文件夹
     * xpxx.name：商品名称
     * xpxx.spu：spu
     * 总销量
     * zxl.num：数量
     * zxl.bhl：变化率。大于0为绿色，小于0为红色
     * chartData：图表数据
     * 短视频销量
     * dspxl.num：数量
     * dspxl.bhl：变化率。大于0为绿色，小于0为红色
     * 直销销量
     * zxxl.num：数量
     * zxxl.bhl：变化率。大于0为绿色，小于0为红色
     * 商品卡销量
     * spkxl.num：数量
     * spkxl.bhl：变化率。大于0为绿色，小于0为红色
     * 商品曝光次数
     * spbgcs.num：数量
     * spbgcs.bhl：变化率。大于0为绿色，小于0为红色
     * 商品点击次数
     * spdjcs.num：数量
     * spdjcs.bhl：变化率。大于0为绿色，小于0为红色
     * 商品加购次数
     * spjgcs.num：数量
     * spjgcs.bhl：变化率。大于0为绿色，小于0为红色
     * 品质差评率
     * pzcpl.num：数量
     * pzcpl.bhl：变化率。大于0为绿色，小于0为红色
     * 品质退货退款率
     * pzthtkl.num：数量
     * pzthtkl.bhl：变化率。大于0为绿色，小于0为红色
     * 点击率
     * djl.num：数量
     * djl.bhl：变化率。大于0为绿色，小于0为红色
     * 加购率
     * jgl.num：数量
     * jgl.bhl：变化率。大于0为绿色，小于0为红色
     * 转化率
     * zhl.num：数量
     * zhl.bhl：变化率。大于0为绿色，小于0为红色
     * **/
    // tableData: [
    //     {
    //         spxx: {
    //             img: './static/image/goods/01.webp',
    //             name: 'Knitted dress with elegant temperament, sleeveless button up dress, long skirt',
    //             spu: 'S232434JKK3255463'
    //         },
    //         zxl: {
    //             num: '7',
    //             bhl: '32.32',
    //             chartData: [1,1,1,1,2]
    //         },
    //         dspxl: {
    //             num: '9',
    //             bhl: '-32.32'
    //         },
    //         zxxl: {
    //             num: '3',
    //             bhl: '32.32'
    //         },
    //         spkxl: {
    //             num: '1',
    //             bhl: '-32.32'
    //         },
    //         spbgcs: {
    //             num: '5',
    //             bhl: '32.32'
    //         },
    //         spdjcs: {
    //             num: '3',
    //             bhl: '-32.32'
    //         },
    //         spjgcs: {
    //             num: '9',
    //             bhl: '32.32'
    //         },
    //         pzcpl: {
    //             num: '6',
    //             bhl: '32.32'
    //         },
    //         pzthtkl: {
    //             num: '4',
    //             bhl: '32.32'
    //         },
    //         djl: {
    //             num: '3',
    //             bhl: '32.32'
    //         },
    //         jgl: {
    //             num: '3',
    //             bhl: '32.32'
    //         },
    //         zhl: {
    //             num: '3',
    //             bhl: '32.32'
    //         }
    //     },
    // ],
    tableData: [
        {
            "spxx": {
                "img": "./static/image/goods/01.jpg", 
                "name": "防晒衣女士春夏季遮阳透气防紫外线纤薄原纱冰丝防嗮服连帽面罩", 
                "spu": "S583K58U679"
            }, 
            "zxl": {
                "num": 439, 
                "bhl": 56.34, 
                "chartData": [
                    8, 
                    4, 
                    6, 
                    9, 
                    5, 
                    2, 
                    6, 
                    1, 
                    9, 
                    7
                ]
            }, 
            "dspxl": {
                "num": 523, 
                "bhl": 67.25
            }, 
            "zxxl": {
                "num": 163, 
                "bhl": 40.06
            }, 
            "spkxl": {
                "num": 438, 
                "bhl": 39.76
            }, 
            "spbgcs": {
                "num": 432, 
                "bhl": 94.3
            }, 
            "spdjcs": {
                "num": 5, 
                "bhl": 50.61
            }, 
            "spjgcs": {
                "num": 236, 
                "bhl": 49.19
            }, 
            "pzcpl": {
                "num": 242, 
                "bhl": 5.38
            }, 
            "pzthtkl": {
                "num": 538, 
                "bhl": 48.11
            }, 
            "djl": {
                "num": 235, 
                "bhl": 87.62
            }, 
            "jgl": {
                "num": 521, 
                "bhl": 97.28
            }, 
            "zhl": {
                "num": 334, 
                "bhl": 1.5
            }
        }, 
        {
            "spxx": {
                "img": "./static/image/goods/02.jpg", 
                "name": "春夏季新款女装欧美外贸亚马逊新品性感修身抹胸直筒连体裤", 
                "spu": "S01X25J1904"
            }, 
            "zxl": {
                "num": 2, 
                "bhl": 80.49, 
                "chartData": [
                    6, 
                    4, 
                    5, 
                    1, 
                    5, 
                    6, 
                    3, 
                    3, 
                    7, 
                    2
                ]
            }, 
            "dspxl": {
                "num": 423, 
                "bhl": 18.68
            }, 
            "zxxl": {
                "num": 247, 
                "bhl": 9.41
            }, 
            "spkxl": {
                "num": 349, 
                "bhl": 1.6
            }, 
            "spbgcs": {
                "num": 549, 
                "bhl": 95.95
            }, 
            "spdjcs": {
                "num": 326, 
                "bhl": 88.78
            }, 
            "spjgcs": {
                "num": 526, 
                "bhl": 1.24
            }, 
            "pzcpl": {
                "num": 422, 
                "bhl": 12.24
            }, 
            "pzthtkl": {
                "num": 329, 
                "bhl": 99.41
            }, 
            "djl": {
                "num": 436, 
                "bhl": 35.59
            }, 
            "jgl": {
                "num": 429, 
                "bhl": 20.32
            }, 
            "zhl": {
                "num": 522, 
                "bhl": 30.6
            }
        }, 
        {
            "spxx": {
                "img": "./static/image/goods/03.jpg", 
                "name": "2025夏季女装新款镂空透视吊带针织V领无袖露背长裙", 
                "spu": "SH270AS0J22"
            }, 
            "zxl": {
                "num": 432, 
                "bhl": 51.05, 
                "chartData": [
                    7, 
                    9, 
                    2, 
                    1, 
                    7, 
                    1, 
                    1, 
                    3, 
                    8, 
                    3
                ]
            }, 
            "dspxl": {
                "num": 437, 
                "bhl": 45.31
            }, 
            "zxxl": {
                "num": 642, 
                "bhl": 35.34
            }, 
            "spkxl": {
                "num": 236, 
                "bhl": 84.95
            }, 
            "spbgcs": {
                "num": 249, 
                "bhl": 86.69
            }, 
            "spdjcs": {
                "num": 557, 
                "bhl": 15.79
            }, 
            "spjgcs": {
                "num": 549, 
                "bhl": 4.06
            }, 
            "pzcpl": {
                "num": 512, 
                "bhl": 7.26
            }, 
            "pzthtkl": {
                "num": 527, 
                "bhl": 37.05
            }, 
            "djl": {
                "num": 467, 
                "bhl": 28.18
            }, 
            "jgl": {
                "num": 469, 
                "bhl": 62.14
            }, 
            "zhl": {
                "num": 649, 
                "bhl": 8.66
            }
        }, 
        {
            "spxx": {
                "img": "./static/image/goods/04.jpg", 
                "name": "女装2025秋冬气质斜肩长袖性感露肩宽松型斜领设计感上衣", 
                "spu": "SL48V8SIP00"
            }, 
            "zxl": {
                "num": 8, 
                "bhl": 59.91, 
                "chartData": [
                    6, 
                    2, 
                    3, 
                    1, 
                    9, 
                    5, 
                    8, 
                    3, 
                    7, 
                    0
                ]
            }, 
            "dspxl": {
                "num": 389, 
                "bhl": 23.6
            }, 
            "zxxl": {
                "num": 469, 
                "bhl": 60.39
            }, 
            "spkxl": {
                "num": 759, 
                "bhl": 85.53
            }, 
            "spbgcs": {
                "num": 647, 
                "bhl": 69.78
            }, 
            "spdjcs": {
                "num": 653, 
                "bhl": 36.93
            }, 
            "spjgcs": {
                "num": 861, 
                "bhl": 30.14
            }, 
            "pzcpl": {
                "num": 539, 
                "bhl": 2.06
            }, 
            "pzthtkl": {
                "num": 544, 
                "bhl": 96.81
            }, 
            "djl": {
                "num": 536, 
                "bhl": 28.75
            }, 
            "jgl": {
                "num": 544, 
                "bhl": 77.28
            }, 
            "zhl": {
                "num": 349, 
                "bhl": 10.43
            }
        }, 
        {
            "spxx": {
                "img": "./static/image/goods/05.jpg", 
                "name": "黑灰色微喇牛仔裤女2025年春秋季新款高腰显瘦小个子修身喇叭裤子", 
                "spu": "S27QL0R1G29"
            }, 
            "zxl": {
                "num": 5320, 
                "bhl": 48.56, 
                "chartData": [
                    2, 
                    1, 
                    3, 
                    7, 
                    0, 
                    1, 
                    9, 
                    0, 
                    5, 
                    0
                ]
            }, 
            "dspxl": {
                "num": 322, 
                "bhl": 9.75
            }, 
            "zxxl": {
                "num": 437, 
                "bhl": 38.34
            }, 
            "spkxl": {
                "num": 319, 
                "bhl": 56.35
            }, 
            "spbgcs": {
                "num": 411, 
                "bhl": 60.16
            }, 
            "spdjcs": {
                "num": 410, 
                "bhl": 39.74
            }, 
            "spjgcs": {
                "num": 413, 
                "bhl": 18.78
            }, 
            "pzcpl": {
                "num": 413, 
                "bhl": 15.3
            }, 
            "pzthtkl": {
                "num": 424, 
                "bhl": 17.93
            }, 
            "djl": {
                "num": 234, 
                "bhl": 91.31
            }, 
            "jgl": {
                "num": 315, 
                "bhl": 98.45
            }, 
            "zhl": {
                "num": 231, 
                "bhl": 90.53
            }
        }, 
        {
            "spxx": {
                "img": "./static/image/goods/06.jpg", 
                "name": "2025跨境新款时尚女装 亚马逊秋季欧美性感镂空系带露背深V连衣裙", 
                "spu": "S53K16947D8"
            }, 
            "zxl": {
                "num": 4218, 
                "bhl": 95.85, 
                "chartData": [
                    1, 
                    5, 
                    4, 
                    5, 
                    6, 
                    8, 
                    4, 
                    6, 
                    4, 
                    4
                ]
            }, 
            "dspxl": {
                "num": 422, 
                "bhl": 94.09
            }, 
            "zxxl": {
                "num": 337, 
                "bhl": 35.55
            }, 
            "spkxl": {
                "num": 334, 
                "bhl": 63.16
            }, 
            "spbgcs": {
                "num": 421, 
                "bhl": 30.04
            }, 
            "spdjcs": {
                "num": 124, 
                "bhl": 91.22
            }, 
            "spjgcs": {
                "num": 214, 
                "bhl": 41.25
            }, 
            "pzcpl": {
                "num": 141, 
                "bhl": 5.61
            }, 
            "pzthtkl": {
                "num": 152, 
                "bhl": 81.7
            }, 
            "djl": {
                "num": 417, 
                "bhl": 16.09
            }, 
            "jgl": {
                "num": 8, 
                "bhl": 92.04
            }, 
            "zhl": {
                "num": 7, 
                "bhl": 48
            }
        }, 
        {
            "spxx": {
                "img": "./static/image/goods/07.jpg", 
                "name": "春季新款女装时尚套裙 欧美性感挂脖两件套下摆不规则包臀裙女", 
                "spu": "S1C046947B7"
            }, 
            "zxl": {
                "num": 5331, 
                "bhl": 92.06, 
                "chartData": [
                    1, 
                    7, 
                    1, 
                    9, 
                    7, 
                    4, 
                    4, 
                    8, 
                    6, 
                    7
                ]
            }, 
            "dspxl": {
                "num": 318, 
                "bhl": 8.56
            }, 
            "zxxl": {
                "num": 128, 
                "bhl": 13.72
            }, 
            "spkxl": {
                "num": 214, 
                "bhl": 23.6
            }, 
            "spbgcs": {
                "num": 141, 
                "bhl": 28.35
            }, 
            "spdjcs": {
                "num": 124, 
                "bhl": 20.88
            }, 
            "spjgcs": {
                "num": 422, 
                "bhl": 82.25
            }, 
            "pzcpl": {
                "num": 431, 
                "bhl": 28.86
            }, 
            "pzthtkl": {
                "num": 513, 
                "bhl": 68.78
            }, 
            "djl": {
                "num": 586, 
                "bhl": 12.19
            }, 
            "jgl": {
                "num": 428, 
                "bhl": 86.04
            }, 
            "zhl": {
                "num": 235, 
                "bhl": 12.72
            }
        }, 
        {
            "spxx": {
                "img": "./static/image/goods/08.jpg", 
                "name": "多色自留 2025春夏新款女桑蚕丝亚麻嗲精罩衫宽松", 
                "spu": "S73546YI618"
            }, 
            "zxl": {
                "num": 4238, 
                "bhl": 4.16, 
                "chartData": [
                    6, 
                    2, 
                    9, 
                    3, 
                    0, 
                    2, 
                    7, 
                    6, 
                    1, 
                    7
                ]
            }, 
            "dspxl": {
                "num": 416, 
                "bhl": 45.71
            }, 
            "zxxl": {
                "num": 223, 
                "bhl": 24.29
            }, 
            "spkxl": {
                "num": 437, 
                "bhl": 99.14
            }, 
            "spbgcs": {
                "num": 237, 
                "bhl": 52.93
            }, 
            "spdjcs": {
                "num": 143, 
                "bhl": 1.22
            }, 
            "spjgcs": {
                "num": 433, 
                "bhl": 67.48
            }, 
            "pzcpl": {
                "num": 424, 
                "bhl": 35.03
            }, 
            "pzthtkl": {
                "num": 248, 
                "bhl": 42.27
            }, 
            "djl": {
                "num": 234, 
                "bhl": 51.75
            }, 
            "jgl": {
                "num": 352, 
                "bhl": 72.99
            }, 
            "zhl": {
                "num": 342, 
                "bhl": 7.85
            }
        }, 
        {
            "spxx": {
                "img": "./static/image/goods/09.jpg", 
                "name": "2025夏季新款短袖t恤女韩版印花宽松学生上衣装纯棉打底衫ins潮", 
                "spu": "S37396790H8"
            }, 
            "zxl": {
                "num": 3237, 
                "bhl": 11.61, 
                "chartData": [
                    6, 
                    4, 
                    6, 
                    7, 
                    4, 
                    7, 
                    9, 
                    9, 
                    1, 
                    2
                ]
            }, 
            "dspxl": {
                "num": 323, 
                "bhl": 35.25
            }, 
            "zxxl": {
                "num": 237, 
                "bhl": 32.59
            }, 
            "spkxl": {
                "num": 316, 
                "bhl": 55.69
            }, 
            "spbgcs": {
                "num": 173, 
                "bhl": 22.48
            }, 
            "spdjcs": {
                "num": 319, 
                "bhl": 21.98
            }, 
            "spjgcs": {
                "num": 327, 
                "bhl": 57.52
            }, 
            "pzcpl": {
                "num": 326, 
                "bhl": 50.64
            }, 
            "pzthtkl": {
                "num": 315, 
                "bhl": 41.99
            }, 
            "djl": {
                "num": 318, 
                "bhl": 23.96
            }, 
            "jgl": {
                "num": 316, 
                "bhl": 98.76
            }, 
            "zhl": {
                "num": 421, 
                "bhl": 56.39
            }
        }, 
        {
            "spxx": {
                "img": "./static/image/goods/10.jpg", 
                "name": "亚马逊新款短袖女装欧美性感一字领露肩长袖修身连体裤", 
                "spu": "S66V17CA83K"
            }, 
            "zxl": {
                "num": 2349, 
                "bhl": 33.52, 
                "chartData": [
                    2, 
                    7, 
                    2, 
                    3, 
                    6, 
                    5, 
                    5, 
                    5, 
                    9, 
                    5
                ]
            }, 
            "dspxl": {
                "num": 124, 
                "bhl": 17.62
            }, 
            "zxxl": {
                "num": 337, 
                "bhl": 86.49
            }, 
            "spkxl": {
                "num": 122, 
                "bhl": 38.02
            }, 
            "spbgcs": {
                "num": 314, 
                "bhl": 9.61
            }, 
            "spdjcs": {
                "num": 427, 
                "bhl": 95.25
            }, 
            "spjgcs": {
                "num": 323, 
                "bhl": 46.37
            }, 
            "pzcpl": {
                "num": 333, 
                "bhl": 48.39
            }, 
            "pzthtkl": {
                "num": 447, 
                "bhl": 96.59
            }, 
            "djl": {
                "num": 326, 
                "bhl": 90.05
            }, 
            "jgl": {
                "num": 238, 
                "bhl": 30.74
            }, 
            "zhl": {
                "num": 435, 
                "bhl": 80.87
            }
        }
    ]
}

